<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix = "spring" uri = "http://www.springframework.org/tags" %>
<head>
	<script src="<c:url value="/static/js/jquery-1.4.4.min.js"/>"></script>
	<script src="<c:url value="/static/js/html-elements.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/Constants"/>"></script>
	<script type="text/javascript" src="<c:url value="/static/js/search.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/static/js/loading.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/static/js/pagination.js"/>"></script>
	<script type="text/javascript" src="<c:url value="/static/js/edition.js"/>"></script>
	<link rel="stylesheet" type="text/css" href="<c:url value="/static/css/search-style.css"/>"></link>
	<link rel="stylesheet" type="text/css" href="<c:url value="/static/css/loading.css"/>"></link>
	<link rel="stylesheet" type="text/css" href="<c:url value="/static/css/pagination.css"/>"></link>
</head>

<script type="text/javascript">
<!--
function search(){
	searchPagedCommonProperties(0);
}

function gameChange(){
	var disableState = ''; 
	if($('#gameId').val() == '-1'){
		disableState = 'disabled';
	}

	$('#searchButton').attr('disabled',disableState);
}

//-->
</script>
<div class="search-table">
	<span class="search-row">
		<span class="search-cell">
			<spring:message code="key.game.label"/>
		</span>
		<span class="search-cell">
			<form:form action="${action}" commandName="dto" method="POST">
						<form:select path="selectedGame" id="gameId" multiple="false" onchange="gameChange();">
							<form:option value="-1">Select Game</form:option>
							<form:options items="${dto.games}" itemValue="id" itemLabel="name" />
						</form:select>
			</form:form>
		</span>
	</span>
	<span id="searchCommonKeys" class="search-row">
		<span class="search-cell">
			<spring:message code="key.game.key.pattern"/>
		</span>
		<span class="search-cell">
			<input type="text" id="keyPattern" />
		</span>
	</span>
	<span class="search-row">
		<span class="search-cell">
			<input type="button" value="<spring:message code="key.common.search"/>" id="searchButton" onclick="search();" disabled="disabled"/>
		</span>
	</span>
 </div>
<div id="existentKeys">
	<span class="search-row">
		<span class="search-result-header">
			<spring:message code="key.property.header.key"/>
		</span>
		<span class="search-result-header">
			<spring:message code="key.property.header.parent"/>
		</span>
		<span class="search-result-header-last">
			<spring:message code="key.property.header.translation"/>
		</span>
	</span>
</div>
	